//
//  GroupCollectionViewCell.m
//  SugarPile
//
//  Created by Charlie. on 16/1/23.
//  Copyright © 2016年 www.lanou39.蓝鸥科技. All rights reserved.
//

#import "GroupCollectionViewCell.h"

@implementation GroupCollectionViewCell
-(void)dealloc
{
    [_name release];
    [super dealloc];
}
// 初始化
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.name = [[UILabel alloc] init];
//        _name.backgroundColor = [UIColor floralWhite];
        [self.contentView addSubview:_name];
        [_name release];
    }
    return self;
}
// 布局
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _name.frame = CGRectMake(0, 0, layoutAttributes.bounds.size.width, layoutAttributes.bounds.size.height);
    _name.font = [UIFont systemFontOfSize:13];
    // 文本居中
    _name.textAlignment = NSTextAlignmentCenter;
}
@end
